function getAge() {
    return new Date().getFullYear() - this.birthday;
}

let person = {
    name: "xiaobai",
    birthday: 2000,
    tag: ["Java", "Kotlin", "Js", "Python"],
    // 定义方式一
    hello: function () {
        console.log(person[name]);
        console.log(person.age);
        console.log(person.tag);
    },
    // 定义方式二
    age: getAge
};
// 所有函数都有apply方法, 让方法指向某个对象
console.log(getAge.apply(person));
console.log(person.age());
